package com.xiaojiu.nohttp;

import com.xiaojiu.util.StringUtils;
import com.yolanda.nohttp.RequestMethod;

import rx.Observable;
/**
 * Created by Jacky on 2016/12/1.
 */
public class GetRequestRx extends BaseRequest<GetRequestRx> {


    public GetRequestRx( String url) {
        this.url = url;
    }
    public <T> Observable<T> execute(Class<T> classOfT) {
        requestMethod(RequestMethod.GET);
        this.url= StringUtils.Joint(this.url,this.mapParams);
        return RequestManager.createArray(this, classOfT);
    }

    public  Observable<String> execute() {
        requestMethod(RequestMethod.GET);
        this.url= StringUtils.Joint(this.url,this.mapParams);
        return RequestManager.createString(this);
    }
}
